extends "../nvzaoshen-3/nvzaoshen-3.gd"


var baseId = ""
var upText1 = "白鹰损管额外提高白鹰舰娘30点装甲"
var upText2 = "紧急抢修触发时满血复活并获得5层<活力>"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("<唯一>友军阵亡时会以30%的血量立即复活一次", "紧急抢修")

func _onBattleStart():
	._onBattleStart()
	for i in getAllChas(2):
		if i.hasBuff("b_jinJiQiangXiu") == null:
			castBuff(i, b_jinJiQiangXiu.new(0.3))

class b_jinJiQiangXiu:
	extends "../../../azurlane_ctrl/AzurBuff.gd"
	var p = 0.3
	func _init(p = 0.3):
		attInit()
		id = "b_jinJiQiangXiu"	
		self.p = p
		buffName = "紧急抢修"
		dispel = 2
	func _connect():
		masCha.connect("onDeath",self,"_onDeath")
		if casCha.upgraded == 2:
			p = 1
	func _onDeath(atkInfo):
		if not masCha.isDeath:return
		masCha.isDeath = false
		masCha.plusHp(masCha.att.maxHp * p)
		isDel = true
		if casCha.upgraded == 2:
			buff.addHuoLi(masCha, casCha, 5)